﻿Imports NMock2

Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports Meiners.Libs.Withings
Imports Meiners.Libs.Withings.Core

'''<summary>
'''This is a test class for UpdateUserResponseTest and is intended
'''to contain all UpdateUserResponseTest Unit Tests
'''</summary>
<TestClass()> _
Public Class UpdateUserResponseTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property


    '''<summary>
    '''A test for Success (positive response)
    '''</summary>
    <TestMethod()> _
    Public Sub SuccessTest_True()
        Dim status As StatusResponseEnum = StatusResponseEnum.Successfull
        Dim target As UpdateUserResponse = New UpdateUserResponse(status)
        Assert.IsTrue(target.Success, "success should be true")
    End Sub
    '''<summary>
    '''A test for Success (negative response)
    '''</summary>
    <TestMethod()> _
    Public Sub SuccessTest_False()
        Dim status As StatusResponseEnum = StatusResponseEnum.AnUnknownErrorOccured
        Dim target As UpdateUserResponse = New UpdateUserResponse(status)
        Assert.IsFalse(target.Success, "Success should be false")
    End Sub

    '''<summary>
    '''A test for UpdateUserResponse Constructor
    '''</summary>
    <TestMethod()> _
    Public Sub UpdateUserResponseConstructorTest()
        Dim status As StatusResponseEnum = StatusResponseEnum.AnUnknownErrorOccured
        Dim target As UpdateUserResponse = New UpdateUserResponse(status)
        Assert.IsInstanceOfType(target, GetType(UpdateUserResponse), "instance type is not correct")
    End Sub
End Class
